<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>函数作用域和全局污染</title>
    
</head>
<body>
    <script type="text/javascript" src="./js/first.js"></script>
    <script type="text/javascript" src="./js/second.js"></script>
    <!-- 后面的函数会覆盖前面的函数 -->
    <script type="text/javascript">
        // 作用域
        var a = 1;
        function func1(){
            var b = 3;
            alert(b);
        }
        alert(a);
        func1();
        // alert(b);
        first();
        second();
    </script>
</body>
</html>